<?php





include_once(abspath.'/includes/funcs/function_absolute.php');
$db = new Database(DB_SERVER, DB_USER, DB_PASS, DB_DATABASE); 

$category = null;
$aboutChannel = array();
$cId = "all";
$catID = 0;
if(!empty($_GET['c'])){
	$cId = $_GET['c'];
	$category = getCategory($_GET['c']);
	$catID = $cId;
}
$aboutChannel = getAboutChannelCategory($catID);

$iconCat = "/images/icon-livematches.png";
if(!empty($category)){
	if($category['icon'] != null) $iconCat = "/upload/".$category['icon'];
}

$channel = array();
$links = array();
$embled_code = null;
$id = null;
if(!empty($_GET['id'])){
	$channel = getChannel($_GET['id']);
	$embled_code = $channel['embled_code'];
	$id = $_GET['id'];
}
$embled = getEmbledChannel($id);

?>

<div class="container">
	<div class="main">
		<div class="streams">
		</div>
		<div class="content">
			<div class="main-area">
				<!-- background: url("../images/icon-livematches.png") no-repeat scroll 0 0 transparent; -->
				<div class="contentheader" >
					<div class="headerbg">
						<div class="icon-livematches" style='background: url("<?php echo $iconCat;?>") no-repeat scroll 0 0 transparent;'></div>
					</div>
					<span class="headertext">
					<?php
					if(!empty($_GET['c'])){
						echo "Live ";
						if(!empty($category)){
							echo $category['alias'];
						}
					}else{
						echo "Live Matches";
					}
					?>
					</span>
				</div>
				<div class="area main-area-border">
					<style type="text/css"></style>

					<div style="display:none" class="event-container">
						<a href="javascript:void(0)" onclick="showEvents()"><strong>Back to events</strong></a>
						<div class="event-block"></div>
					</div>
					<table align="center" cellpadding="0" cellspacing="0" width="100%" border="0" class="component lshoutsidetab">
						<tr>
							<td colspan="2">
								<!-- main container of tabs and slides -->
								</dl>
								<div class="lshcurrent">
									<!-- main container of slides -->
									<dd id="secevents0" class="lshdd"  >
										<!-- section description with img -->
										<table width="100%" class="sectiontable" cellpadding="0" cellspacing="0" border="0" style="padding: 0px;">
											<tr>
												<td style="display:none" class="debanner" id="debanner" align="center" colspan="2"><a href="http://affiliates.score-affiliates.com/processing/clickthrgh.asp?btag=a_112196b_1814">
													<img src="<?php echo baseurl;?>images/sprt_football_generic_bet10get30_468x60_de.gif" /></a></td>
											</tr>
											<!--tr>
												<td>fdsafd/td>
												<td valign="middle" align="right" width="10" height="10" >fds fd </td>
											</tr-->
											
										</table>
										
										<div style="text-align:center">
											<h2 style="text-align:center">
												More Links
											</h2>
											<?php
											$count = 1;
											foreach($embled as $key=>$value){
												if(!empty($_GET['embled']) && $_GET['embled'] == $value['id']){
													$embled_code = $value['embled_code'];
												}
											?>
												
													| <a href="/watch.php?id=<?php echo $value['channel_id'];?>&embled=<?php echo $value['id'];?>">Link #<?php echo $count;?></a> |
												
											<?php
												$count++;
											}
											?>
										</div>
										<div id="dataAboutChannels">
											<?php echo $embled_code;?>

										</div>
										
										<h5 style="color:orange">
										* This website is free. If you buy an account in some other website, ask for your money back, because it's a scam they sell you an account and redirect you to a free website.
										</h5>
										<div style="vertical-align: middle; line-height:40px;">
											<label style="text-align:center"><h4>EMBED CODE:</h4></label>
											<textarea style="width:98%" cols="60" name="embed" rows="3"><?php echo $embled_code;?></textarea>
										</div>
									</dd>
									
									<!-- main container after dd for sliders -->
									<!-- close lshcurrent -->
								</div>
								
							</td>
						</tr>
					</table>
				</div>
			</div>
			<div class="sidebar">
				<div class="for-webmasters">
					<div class="mask-webmasters">
						<div class="webmasters-head">
							<img src="<?php echo baseurl;?>streamhunter/images/for-webmasters.png" />
							<span>For Webmasters</span>
						</div>
					</div>
					<div class="webmasters-body">
						<div class="text">Put our Sport Streams Widget on your website!</div>
						<div class="mask-yellow-button">
							<a href="for-webmasters.html" class="yellow-button"><span>Read More</span></a>
						</div>
					</div>
				</div>
				<div class="for-streamers">
					<div class="mask-streamers">
						<div class="streamers-head">
							<img src="<?php echo baseurl;?>streamhunter/images/for-streamers.png" />
							<span>For Streamers</span>
						</div>
					</div>
					<div class="streamers-body">
						<div class="text">Add your Stream adresses to Stream Hunter!</div>
						<div class="mask-yellow-button">
							<a href="add-your-stream.html" class="yellow-button"><span>Read More</span></a>
						</div>
					</div>
				</div>
				<!--<div class="find-facebook">
					<iframe frameborder="0" scrolling="no" allowtransparency="true" style="border: medium none; overflow: hidden; width:234px; height: 270px;" src="http://www.facebook.com/plugins/fan.php?api_key=&amp;sdk=joey&amp;connections=8&amp;css=http%3A%2F%2Fwww.streamhunter.eu%2Ffb.css%3F13&amp;height=270&amp;id=507141305994897&amp;logobar=false&amp;stream=false&amp;width=244"/></iframe>
				</div>-->
				<div class="clear"></div>
			</div>
		</div>
	</div>
</div>